#pragma once

#include "Object/Object.h"
#include "Math/Color.h"
#include "EditorPanelViewModel.m.h"

class REditorPanelModel;
class REditorAbilityViewModel;
class RTexture2D;

//放在主窗口下方的控件
//用于输出各种信息
RCLASS(ExtraHeader="Ability/EditorAbilityViewModel.h")
class REditorPanelViewModel : public RObject
{
    ROBJECT

public:
    void BindModel(TSharedObjectPtr<REditorPanelModel> InModel);


    //panel
    const float PanelTitleHeight = 35;
    bool IsPanelAbilityVisible(int64_t InIndex) const;
    void SetActivedPanelAbilityIndex(int64_t InIndex);
    int64_t GetPanelAbilitysNum() const;
    TSharedObjectPtr<REditorAbilityViewModel> GetPanelAbility(int64_t Index) const;
    TDelegate<void,int64_t,TSharedObjectPtr<REditorAbilityViewModel>> OnPanelAbilityAdded;
    TDelegate<void,int64_t> OnPanelAbilityRemoved;
    const SColor PanelTitleHighlightColor=SColor::FromHexRGB(0x0078D4);
    TSharedObjectPtr<RTexture2D> PanelCloseIcon;

protected:
    TWeakObjectPtr<REditorPanelModel> Model;

    RFIELD()
    TVector<TSharedObjectPtr<REditorAbilityViewModel>> PanelAbilitys;

};
